package com.gzbugu.bugusys.junit;

import java.util.List;

import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.gzbugu.bugusys.dao.IBaseDAO;

public class TestSometing {

	private static ApplicationContext ctx = null;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		ctx = new ClassPathXmlApplicationContext(new String[] {
				"classpath:com/gzbugu/bugusys/spring/actionBeans.xml",
				"classpath:com/gzbugu/bugusys/spring/otherSpring.xml",
				"classpath:com/gzbugu/bugusys/spring/applicationContext.xml" });
	}

	@Test
	public void testSesstion() {
		IBaseDAO dao = (IBaseDAO) ctx.getBean("baseDAO");
		List list = dao.findAll(com.gzbugu.bugusys.fields.VoClasseFields.TYPE);
		System.out.println(list.size());
	}

}
